To acknowledge the tools' setting of control/shutdown it is normal for
PV drivers to rm the key. This leads to libxl__xs_read() returning
NULL and thus a subsequent strcmp on the return value will cause a
segfault.
Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
usleep(100000);
state = libxl__xs_read(si->gc, XBT_NULL, path);
+ if (!state) state = "";
watchdog--;
}
t = xs_transaction_start(ctx->xsh);
state = libxl__xs_read(si->gc, t, path);
+ if (!state) state = "";
if (!strcmp(state, "suspend"))
libxl__xs_write(si->gc, t, path, "");